#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
#include<list>


int main()
{
	list<int> lt1;
	lt1.push_back(1);
	lt1.push_back(2);
	lt1.push_back(3);
	lt1.push_back(4);
	lt1.push_back(5);

	list<int>::iterator it = lt1.begin();
	while (it != lt1.end())
	{
		cout << *it << "  ";
		it++;
	}

	cout << endl;

	for (auto e : lt1)
	{
		cout << e << "  ";
	}
	cout << endl;

	return 0;
}